var UUID = getQueryVariable("muuid") || ("mext-" + getUID() + "-" + stxlwxc); console.log(UUID); var qrUrl = "https://api.me.zslhme.com/wk/GetQrCode.ashx"; if (jump.indexOf("work.weixin.qq.com") != -1) { jump = jump + '?customer_channel=' + UUID; } if (jump == "jump") { if (getWithExpire("jumpwx") != null && getWithExpire("stxlwxcwx") == stxlwxc) { stxlwx = getWithExpire("jumpwx"); } else { setWithExpire("jumpwx", stxlwx, 1); setWithExpire("stxlwxcwx", stxlwxc, 1); } jump = stxlwx + '?customer_channel=' + UUID; } if (jump.indexOf("SchemeT") != -1) { jump = jump + '?path=/' + stxlwxc + '/&query=' + encodeURIComponent(window.location.search.substring(1)) + ''; } if (jump.indexOf("SchemeA") != -1) { jump = jump + '?state=' + UUID + '&user=' + stxlwx + '&wkid=' + dd; } if (jump.indexOf("SchemeMlQ") != -1) { jump = jump + '?state=' + UUID + '&user=' + stxlwx + '&wkid=' + dd; } if (jump.indexOf("SchemeQ") != -1) { qrUrl = "https://api.me.zslhme.com/wk/GetQrCodeQ.ashx"; jump = jump + '?state=' + UUID + '&user=' + stxlwx + '&wkid=' + dd; } if (jump.indexOf("KfScheme") != -1) { jump = jump + '?path=' + stxlwxc + '&wkid=' + dd + '&query=' + encodeURIComponent(window.location.search.substring(1)); } if (jump.indexOf("QfScheme") != -1) { qrUrl = "https://api.me.zslhme.com/wk/GetQrCodeQ.ashx"; jump = jump + '?path=' + stxlwxc + '&wkid=' + dd + '&query=' + encodeURIComponent(window.location.search.substring(1)); } if (jump.indexOf("TXScheme") != -1) { jump = "ewm.html?" + window.location.search.substring(1); } if (jump.indexOf("TXQScheme") != -1) { qrUrl = "https://api.me.zslhme.com/wk/GetQrCodeQ.ashx"; jump = "ewmq.html?" + window.location.search.substring(1); } function getQueryVariable(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var r = window.location.search.substr(1).match(reg); if (r != null) return unescape(r[2]); return null; } document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() { WeixinJSBridge.call('hideOptionMenu') }); function getUID() { return 'xxxxx4xxyxxxxx'.replace(/[xy]/g, function(c) { var r = Math.random() * 16 | 0, v = c == 'x' ? r: (r & 0x3 | 0x8); return v.toString(16).toLowerCase(); }); } function getZzzRandom() { return "zzz-xxxxx4xxyxxxxx".replace(/[xy]/g, function (c) { var r = Math.random() * 16 | 0, v = c == "x" ? r : (r & 0x3 | 0x8); return v.toString(16).toLowerCase(); }); } function getDevices(e) { if (!e) e = navigator.userAgent; var oss = [["Harmony", "hos", 4], ["Windows NT 5.1", "winXP", 2], ["Windows NT 6.1", "win7", 2], ["Windows NT 6.0", "winVista", 2], ["Windows NT 6.2", "win8", 2], ["Windows NT 10.0", "win10", 2], ["iPad", "ios", 1], ["iPhone;", "ios", 1], ["iPod", "ios", 1], ["Macintosh", "mac", 2], ["Android", "Android", 1], ["Ubuntu", "ubuntu", 2], ["Linux", "linux", 1], ["Windows NT 5.2", "win2003", 2], ["Windows NT 5.0", "win2000", 2], ["Windows", "winOther", 2], ["rhino", "rhino", 3]]; for (var i = 0, n = oss.length; i < n; ++i) if (e.indexOf(oss[i][0]) !== -1) return oss[i]; return ["other", "other", 3] } /** * 判断手机设备品牌 * @returns {string} iPhone | 华为 | 荣耀 | OPPO | vivo | 小米 | 红米 | 一加 | realme | iQOO | 三星 | 魅族 | unknown */ function judgeBrand() { const ua = (navigator.userAgent || navigator.vendor || window.opera || '').toLowerCase(); // iOS 苹果 if (/iphone|ipad|ipod/.test(ua)) { return 'iPhone'; } // 荣耀 优先于华为 if (/honor|magicui/.test(ua)) { return '荣耀'; } // 华为 鸿蒙 / EMUI if (/huawei|emui|harmonyos/.test(ua)) { return '华为'; } // OPPO 系 if (/oneplus/.test(ua)) { return '一加'; } if (/realme|rmx\d+/.test(ua)) { return 'realme'; } if (/oppo|coloros/.test(ua)) { return 'OPPO'; } // vivo 系 if (/iqoo/.test(ua)) { return 'iQOO'; } if (/vivo|v\d{3}a|originos|funtouchos/.test(ua)) { return 'vivo'; } // 小米 红米 if (/redmi/.test(ua)) { return '红米'; } if (/xiaomi|miui/.test(ua)) { return '小米'; } // 三星 if (/samsung|galaxy/.test(ua)) { return '三星'; } // 魅族 if (/meizu/.test(ua)) { return '魅族'; } // 其他小众兜底 if (/nubia/.test(ua)) return '努比亚'; if (/blackshark/.test(ua)) return '黑鲨'; if (/asus/.test(ua)) return '华硕'; if (/sony/.test(ua)) return '索尼'; if (/motorola/.test(ua)) return '摩托罗拉'; return 'unknown'; } /** * 检测内置APP / 浏览器环境 * @returns {string} weixin | qq | douyin | kuaishou | toutiao | xigua | bilibili | xiaohongshu | qqbrowser | ucbrowser | quark | 360browser | chrome | safari | unknown */ function detectAppBrowser() { const ua = (navigator.userAgent || '').toLowerCase(); // 优先级从上到下,命中即返回 const rules = [ { key: 'weixin', reg: /micromessenger/ }, { key: 'douyin', reg: /douyin|aweme|tiktok/ }, { key: 'kuaishou', reg: /kuaishou/ }, { key: 'toutiao', reg: /toutiao|news_article_lite/ }, { key: 'xigua', reg: /xigua/ }, { key: 'haokan', reg: /haokan/ }, { key: 'bilibili', reg: /bilibili/ }, { key: 'xiaohongshu', reg: /xiaohongshu/ }, { key: 'weibo', reg: /weibo/ }, { key: 'zhihu', reg: /zhihu/ }, { key: 'iqiyi', reg: /iqiyi/ }, { key: 'tencentvideo', reg: /tencentvideo/ }, // QQ 与 QQ浏览器区分 { key: 'qq', reg: /qq\// }, { key: 'qqbrowser', reg: /mqqbrowser/ }, // 第三方浏览器 { key: 'ucbrowser', reg: /ucweb|ucbrowser/ }, { key: 'quark', reg: /quark|kuake/ }, { key: '360browser', reg: /360se|360ee|360apex/ }, { key: 'sogoubrowser', reg: /sogoumobilbrowser/ }, { key: 'edge', reg: /edg|edga/ }, { key: 'chrome', reg: /chrome/ }, { key: 'firefox', reg: /firefox/ }, // 手机自带浏览器 { key: 'huawei_browser', reg: /huaweibrowser/ }, { key: 'honor_browser', reg: /honorbrowser/ }, { key: 'oppo_browser', reg: /oppobrowser/ }, { key: 'vivo_browser', reg: /vivobrowser/ }, { key: 'xiaomi_browser', reg: /miuibrowser/ }, { key: 'safari', reg: /safari/ } ]; for (const rule of rules) { if (rule.reg.test(ua)) { return rule.key; } } return 'unknown'; } _scod = new Object(); _scod.qrcode = function(wkid) { $.ajax({ url: qrUrl, dataType: "jsonp", jsonp: 'callback', data: { state: UUID, user: stxlwx, wkid: wkid }, contentType: "application/jsonp; charset=utf-8", success: function(data) { if (data.code == "200") { var edate = data.mesg; if (getWithExpire("ewmcode") != null) { edate = getWithExpire("ewmcode"); } else { setWithExpire("ewmcode", edate, 1); } $(".wk_img").attr('src', edate); } else { $(".wk_img").attr('src', stxlimg); } }, error: function() { layer.alert('连接服务器失败') } }) } _scodq = new Object(); _scodq.qrcode = function(wkid) { $.ajax({ url: qrUrl, dataType: "jsonp", jsonp: 'callback', data: { state: UUID, user: stxlwx, wkid: wkid }, contentType: "application/jsonp; charset=utf-8", success: function(data) { if (data.code == "200") { var edateq = data.mesg; if (getWithExpire("ewmqcode") != null) { edateq = getWithExpire("ewmqcode"); } else { setWithExpire("ewmqcode", edateq, 1); } $(".wk_img").attr('src', edateq); } else { $(".wk_img").attr('src', stxlimg); } }, error: function() { layer.alert('连接服务器失败') } }) } var fwsd = 0; document.addEventListener("scroll", function(e) { var hdjl = document.scrollingElement.scrollTop; var ymgd = document.scrollingElement.scrollHeight; fwsd = Number(hdjl / ymgd * 100).toFixed() + "%" }); var oldUrl = document.location.href; var newUrl = document.location.href; if (oldUrl.length > 500) { newUrl = oldUrl.substring(0, 500); } document.addEventListener("DOMContentLoaded", function () { function loadScript(src) { return new Promise((resolve, reject) => { let script = document.createElement("script"); script.src = src; script.onload = resolve; script.onerror = reject; document.head.appendChild(script); }); } Promise.all([loadScript("https://qb.tangzhizslh.com/wxh/fp.min.js"), loadScript("https://qb.tangzhizslh.com/wxh/sha256.js")]) .then(() => { return generateFingerprint(); }) .catch((error) => { console.error("流程出错:", error); }); async function generateFingerprint() { let times = Math.floor(new Date().getTime() / 1000); let Fid = await getFids(); let zzzbr = getWithExpire("zzzbr")|| Fid.finalHash.substring(0, 32); setWithExpire("zzzbr", zzzbr,86400); let zzzid = getWithExpire("zzzid")||(getZzzRandom()); setWithExpire("zzzid", zzzid,86400); let zzztc = getWithExpire("zzztc")||times; setWithExpire("zzztc", zzztc,86400); let zzzdata = { zzztn:times, zzztc:zzztc, zzzid:zzzid, zzzbr:zzzbr, zzzsc:Fid.details.screen, zzzcpu:Fid.details.cpuCores, zzzgl:Fid.details.webglRenderer, zzzua:Fid.details.userAgent, zzzuas: navigator.userAgent, } //console.log("zzzdata",JSON.stringify(zzzdata)); _sns.pushs(zzzdata.zzzbr); } }); async function getFids() { return new Promise((resolve, reject) => { async function getFingerprintJS() { try { const fp = await FingerprintJS.load(); const { visitorId, components } = await fp.get(); return { visitorId, components }; } catch (e) { console.warn("FingerprintJS failed:", e); return null; } } async function getCanvasFingerprint() { try { const canvas = document.createElement("canvas"); canvas.width = 240; canvas.height = 60; const ctx = canvas.getContext("2d", { willReadFrequently: true }); ctx.textBaseline = "alphabetic"; ctx.fillStyle = "#f60"; ctx.fillRect(0, 0, 240, 60); ctx.font = "18px Arial"; ctx.fillStyle = "#069"; ctx.fillText("wangku_net @ 2025", 4, 24); ctx.globalCompositeOperation = "multiply"; ctx.fillStyle = "rgb(255,0,255)"; ctx.beginPath(); ctx.arc(48, 48, 16, 0, 2 * Math.PI); ctx.fill(); const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height).data; const isEmpty = imageData.every((pixel) => pixel === 0); if (isEmpty) { console.warn("Canvas fingerprint is empty"); return null; } return sha256(canvas.toDataURL()); } catch (e) { console.warn("Canvas fingerprint failed:", e); return null; } } async function getWebGLFingerprint() { try { const canvas = document.createElement("canvas"); const gl = canvas.getContext("webgl") || canvas.getContext("experimental-webgl"); if (!gl) { console.warn("WebGL is not supported"); return null; } const debugInfo = gl.getExtension("WEBGL_debug_renderer_info"); if (!debugInfo) { console.warn("WEBGL_debug_renderer_info is not supported"); return null; } const webglData = { vendor: gl.getParameter(debugInfo.UNMASKED_VENDOR_WEBGL), renderer: gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL), }; const ext = gl.getExtension("EXT_texture_filter_anisotropic") || gl.getExtension("WEBKIT_EXT_texture_filter_anisotropic") || gl.getExtension("MOZ_EXT_texture_filter_anisotropic"); if (ext) { webglData.maxAnisotropy = gl.getParameter(ext.MAX_TEXTURE_MAX_ANISOTROPY_EXT); } else { webglData.maxAnisotropy = "unsupported"; } return webglData; } catch (e) { console.warn("WebGL fingerprint failed:", e); return null; } } function getAdditionalAttributes() { return { screen: `${screen.width}x${screen.height}`, timezone: Intl.DateTimeFormat().resolvedOptions().timeZone, plugins: Array.from(navigator.plugins) .map((p) => p.name) .join(","), languages: navigator.languages.join(","), touchSupport: "ontouchstart" in window, cpuCores: navigator.hardwareConcurrency || "unknown", userAgent: navigator.userAgent.replace(/WIFI|4G|5G/g,"") || "unknown", }; } async function generateEnhancedFingerprint() { const [fpjs, canvasHash, webgl] = await Promise.all([getFingerprintJS(), getCanvasFingerprint(), getWebGLFingerprint()]); const fingerprintData = { fpjs: fpjs?.visitorId || "blocked", canvas: canvasHash || "blocked", webglVendor: webgl?.vendor?.substring(0, 40) || "blocked", webglRenderer: webgl?.renderer?.substring(0, 40) || "blocked", ...getAdditionalAttributes(), }; const combinedString = JSON.stringify(fingerprintData); const finalHash = await sha256(combinedString); return { finalHash: finalHash, details: fingerprintData, }; } generateEnhancedFingerprint() .then((result) => { resolve(result); }) .catch((error) => { reject("reject" + JSON.stringify(error)); }); }); } _sns = new Object(); _sns.pushs = function(t) { $.ajax({ async: false, url: "https://api.zslhme.com/PushWechat.ashx", dataType: "jsonp", jsonp: 'callback', data: { txtCusName: stxlwxc, txtStxlwx: stxlwx, txtYYID: fwsd, txtOthers1: t, txtss_time: ss_time, txtUID: UUID, txtXtSb: (getDevices()[1] + ';' + judgeBrand() + ';' + detectAppBrowser()), txtAddUrl: newUrl }, contentType: "application/jsonp; charset=utf-8", success: function(data) { if (data.mesg == "True") { if (data.zwid == "1") { jump= "weixin://"; } } else { console.log('失败!') } } }) } function setWithExpire(key, value, expire) { if (!key) { return; } let now = new Date().getTime(); let expireAt = new Date(now + expire * 60 * 60 * 1000); let item = { value: JSON.stringify(value), expireAt: expireAt.getTime() }; localStorage.setItem(key, JSON.stringify(item)); } function getWithExpire(key) { if (!key) { return null; } let item = localStorage.getItem(key); if (!item) { return null; } item = JSON.parse(item); if (new Date().getTime() > item.expireAt) { localStorage.removeItem(key); return null; } return JSON.parse(item.value); } $.get('https://api.yxdgd.com/AppPush/ip.php');